package day10;

import org.junit.Test;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author joker
 * @date 2022/4/20 0020 - 23:55
 */
public class FileTest6 {
    public static void main(String[] args) throws IOException {
        File file = new File("hello.txt");
        System.out.println(file.getAbsolutePath());
        FileWriter fw = new FileWriter("hello6.txt");
        fw.write("abc");
//        fw.close();
        fw.flush();
    }
    @Test
    public void test1() throws IOException {
        File file = new File("hello6.txt");
        System.out.println(file.length());
    }
}
